package com.jawabra.school;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Toast;

import com.jawabra.school.model.Classroom;
import com.jawabra.school.model.Teacher;
import com.school.android.R;

public class MainActivity extends Activity
{
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	public void students(View view)
	{
		Intent intent=new Intent(MainActivity.this,AddstudentActivity.class);
		startActivity(intent);
	}
	public void teachers(View view)
	{
		Intent intent=new Intent(MainActivity.this,AddteacherActivity.class);
		startActivity(intent);
	}
	public void results(View view)
	{
			Classroom class1=(Classroom) getIntent().getExtras().getSerializable("myclass");
			Intent intent=new Intent(MainActivity.this,ResultsActivity.class);
			intent.putExtra("myclass",class1);
			startActivity(intent);
	}
}